import request from '@/utils/request'


// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/order/listAll',
    method: 'get',
    params: query
  })
}

// 新增订单信息
export function addOrder(data) {
  return request({
    url: '/order',
    method: 'post',
    params: data
  })
}

// 修改订单信息
export function updateOrder(data) {
  return request({
    url: '/order',
    method: 'put',
    params: data
  })
}

// 删除订单信息
export function delOrder(id) {
  return request({
    url: `/order?orderId=` + id,
    method: 'delete'
  })
}

//导入商品类订单
export function uploadOtherOrder(data) {
  return request({
    url: `/file/upload/purchase/other`,
    method: 'post',
    data: data
  })
}

//导入工程类订单
export function uploadProjectOrder(data) {
  return request({
    url: `/file/upload/purchase/project`,
    method: 'post',
    data: data
  })
}
//查看订单详情
export function orderDetail(query) {
  return request({
    url: '/order/releaseMaterials',
    method: 'get',
    params: query
  })
}

//查看报价详情
export function orderQuotation(query) {
  return request({
    url: '/order/orderQuotation',
    method: 'get',
    params: query
  })
}

//中标
export function successBid(data) {
  return request({
    url: '/order/successBid',
    method: 'post',
    params: data
  })
}

export function deliveryGood(data) {
  return request({
    url: '/order/deliverygoods',
    method: 'get',
    params: data
  })
}

export function getFalseSupplier(data) {
  return request({
    url:'/order/falseSupplier',
    method: 'get',
    params: data
  })
}

export function remind(data) {
  return request({
    url: '/order/remind',
    method: 'get',
    params: data
  })
}

export function evaluateByOut(data) {
  return request({
    url: '/order/waibuUrl',
    method: 'post',
    params: data
  })
}